#ifndef IPADDRESS_H
#define IPADDRESS_H

#include <QWidget>
#include <QTimer>

namespace Ui {
class IPAddress;
}

class IPAddress : public QWidget
{
    Q_OBJECT

public:
    explicit IPAddress(QWidget *parent = nullptr);
    ~IPAddress();
    void clear();
    QString getIP();
    void setIP(const QString & addr = "255.255.255.0");

public slots:
    bool eventFilter(QObject *,QEvent *);

private slots:
    void valueChanged(const QString &arg1);
    void editingFinished();

private:
    void initWidget();

private:
    Ui::IPAddress *ui;
    QString ip;
};

#endif // IPADDRESS_H
